The present disclosure relates generally to computing systems, and more particularly to operating databases and dispatching queries.
Databases are used to store information for an innumerable number of applications and use case scenarios. Various types of database management systems (DBMSs) exist and various different database schemas are used, respectively, to optimize for performing some particular kinds of database queries efficiently. Said special-purpose databases may be structured as to allow efficient processing of database queries of a first type but may be slow when processing database queries of another type because of the table structure and indices of the database, or because the internal query optimization logic of the corresponding DBMS is not optimized for said other kind of queries. For example, an online analytical processing (OLAP) database may process OLAP queries efficiently, but not OLTP queries. An online transactional processing (OLTP) database may process OLTP queries efficiently, but not OLAP queries.
Some existing approaches (based e.g. on hybrid DBMSs) try to overcome said difficulties by storing the data redundantly in two different copies of the data to be queried. Each copy being stored in a database that is optimized for efficiently performing a particular kind of database query. Data changes applied in one of said copies is replicated to the other copy to ensure that a query returns the same result, irrespective of whether the query is performed on the original database or on the copy.
A problem of using a combination of two or more databases optimized for different query types which are synchronized by a replication process is that the decision to which database a particular query is dispatched is often inflexible and/or not optimal in terms of performance.